<template>
  <div>
    <!-- 面包屑 -->
    <bread></bread>
    <!-- 页面可视区 -->
    <el-card class="box-card">
      <el-table :data="powerList" border style="width: 100%" stripe>
        <el-table-column type="index" label="#" width="50"> </el-table-column>
        <el-table-column prop="authName" label="权限名称"> </el-table-column>
        <el-table-column prop="path" label="路径"> </el-table-column>
        <el-table-column prop="level" label="权限等级">
          <template v-slot='scope'>
            <el-tag v-show="scope.row.level == '0'">一级</el-tag>
            <el-tag type="success" v-show="scope.row.level == '1'">二级</el-tag>
            <el-tag type="warning" v-show="scope.row.level == '2'">三级</el-tag>
          </template>
        </el-table-column>
      </el-table>
    </el-card>
  </div>
</template>

<script>
import bread from "../bread";
import Bread from "../bread.vue";
export default {
  components: { bread },
  name: "",
  data() {
    return {
      powerList: [], 
    };
  },
  //获取数据直接渲染
  async mounted() {
    
    let { data: res } = await this.$axios.get(`rights/list`);
    this.powerList = res;

  },
  methods: {},
  computed: {},
  watch: {},
};
</script>

<style lang="scss" scoped></style>
